<?php
declare (strict_types = 1);

namespace app\index\controller;

#[path('/index/controller', 'file path')]
#[class('Index', 'Index data handel')]
class Index extends Base
{
    public function initialize()
    {
        parent::initialize();
    }

    public function index()
    {
        $list_dir = $this->getAllFile($this->full_path);

        // echo "<pre>";
        // print_r($path);
        // print_r($navigation);
        // exit;

        return view('', [
            'list_dir' => $list_dir,
        ]);
    }

    // 获取当前目录的所有文件
    public function getAllFile($full_path = '/')
    {
        $list_dir = $this->file->getAllFile($full_path);

        return $list_dir;
    }

}
